import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Video from 'video.js'
import 'video.js/dist/video-js.css'
Vue.prototype.$video = Video;
// 导入Mui框架样式
import './lib/mui/css/mui.css'
import './lib/mui/css/icons-extra.css'
// 导入mint-ui样式
import 'mint-ui/lib/style.css'
// eslint-disable-next-line no-unused-vars
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
// eslint-disable-next-line no-unused-vars
import { Header, Swipe, SwipeItem, Field, Lazyload, Button, Cell, IndexList, IndexSection, Switch, Range, MessageBox } from 'mint-ui';
// Vue.use(MintUI)
import './assets/css/my-mint.scss'
// Mint-UI
Vue.use(Lazyload)
Vue.component(Header.name, Header)
Vue.component(Swipe.name, Swipe)
Vue.component(SwipeItem.name, SwipeItem)
Vue.component(Field.name, Field)
Vue.component(Button.name, Button)
Vue.component(Cell.name, Cell)
Vue.component(IndexList.name, IndexList)
Vue.component(IndexSection.name, IndexSection)
Vue.component(Switch.name, Switch)
Vue.component(Range.name, Range)
Vue.prototype.$messagebox = MessageBox
Vue.use(ElementUI)
Vue.config.productionTip = false
// 添加路由导航守卫，用来动态设置标题内容
router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title + ' - 朱董董音乐网'
  }
  next()  //放行函数，不加无法继续运行
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
